import request from '../config/indexNew'

/**
 * 私聊回复列表
 * @param data 
 * @returns 
 */
export const getSmartReplySingleList = (data: ISingReplyFormData) => {
    return request({
      url: '/api/win-tool/SmartReplySingle/list',
      method: 'POST',
      data
    })
}


/**
 * 私聊回复新建&编辑
 * @param data 
 * @returns 
 */
export const createSmartReplySingle = (data) => {
    return request({
      url: '/api/win-tool/SmartReplySingle/put',
      method: 'POST',
      data
    })
}


/**
 * 私聊回复-启用状态切换
 * @param data 
 * @returns 
 */
export const toggleSmartReplySingleStatus = (data) => {
    return request({
      url: '/api/win-tool/SmartReplySingle/toggle',
      method: 'POST',
      data
    })
}

/**
 * 私聊回复-删除
 * @param data 
 * @returns 
 */
export const deleteSmartReplySingle = (data) => {
    return request({
      url: '/api/win-tool/SmartReplySingle/del',
      method: 'POST',
      data
    })
}

/**
 * 私聊回复-详情
 * @param data 
 * @returns 
 */
export const getSmartReplySingleDetail = (data) => {
    return request({
      url: '/api/win-tool/SmartReplySingle/detail',
      method: 'POST',
      data
    })
}

/**
 * 私聊回复-回复详情列表
 * @param data 
 * @returns 
 */
export const getSmartReplySingleRecordList = (data) => {
    return request({
      url: '/api/win-tool/SmartReplySingle/record-list',
      method: 'POST',
      data
    })
}

/**
 * 私聊回复-回复内容详情
 * @param data 
 * @returns 
 */
export const getSmartReplySingleRecordDetail = (data) => {
    return request({
      url: '/api/win-tool/SmartReplySingle/record-detail',
      method: 'POST',
      data
    })
}

/**
 * 群聊回复列表
 * @param data 
 * @returns 
 */
export const getSmartReplyChatList = (data: ISingReplyFormData) => {
    return request({
      url: '/api/win-tool/SmartReplyChat/list',
      method: 'POST',
      data
    })
}

/**
 * 群聊回复-新建&编辑
 * @param data 
 * @returns 
 */
export const createSmartReplyChat = (data) => {
    return request({
      url: '/api/win-tool/SmartReplyChat/put',
      method: 'POST',
      data
    })
}

/**
 * 群聊回复-详情
 * @param data 
 * @returns 
 */
export const getSmartReplyChatDetail = (data) => {
    return request({
      url: '/api/win-tool/SmartReplyChat/detail',
      method: 'POST',
      data
    })
}

/**
 * 群聊回复-启用状态切换
 * @param data 
 * @returns 
 */
export const toggleSmartReplyChatStatus = (data) => {
    return request({
      url: '/api/win-tool/SmartReplyChat/toggle',
      method: 'POST',
      data
    })
}

/**
 * 群聊回复-删除
 * @param data 
 * @returns 
 */
export const deleteSmartReplyChat = (data) => {
    return request({
      url: '/api/win-tool/SmartReplyChat/del',
      method: 'POST',
      data
    })
}

/**
 * 群聊回复-回复详情列表
 * @param data 
 * @returns 
 */
export const getSmartReplyChatRecordList = (data) => {
    return request({
      url: '/api/win-tool/SmartReplyChat/record-list',
      method: 'POST',
      data
    })
}

/**
 * 群聊回复-回复内容详情
 * @param data 
 * @returns 
 */
export const getSmartReplyChatRecordDetail = (data) => {
    return request({
      url: '/api/win-tool/SmartReplyChat/record-detail',
      method: 'POST',
      data
    })
}

/**
 * 群聊回复-预计群聊数
 */
export const getReplyEstimatedNumber = (data) => {
    return request({
        url: '/api/win-tool/SmartReplyChat/expect',
        method: 'POST',
        data
    })
}

/**
 * 搜索表单数据类型
 */
export interface ISingReplyFormData {
    /** 规则名称 ｜ 标题 */
    titleKeyword: string,
    /** 创建的时间 */
    createAt: any[],
    /** 任务状态1：开启，2关闭  */
    status?: 0 | 1 | 2,
    /** 回复方式1：全部回复，2随机回复一条  */
    replyType?: 0 | 1 | 2,
}

 